#pragma once

class CProcessList {
public:
	typedef CAtlList<PROCESSENTRY32*> ProcessList;

	CProcessList(void);
	~CProcessList(void);
	void Destroy();

	const ProcessList& Create();
	
	static bool IsSystem(DWORD pid);
	static bool IsWow64Process(DWORD pid);

private:
	CAtlList<PROCESSENTRY32*> m_Processes;
};

class CModuleList {
public:
	CModuleList(DWORD pid);
	~CModuleList();

	void Reset();

	MODULEENTRY32* GetNext();

private:
	HANDLE m_hEnum;
	MODULEENTRY32 m_ModuleInfo;
};

class CThreadList {
public:
	CThreadList();
	~CThreadList();

	void Reset();

	THREADENTRY32* GetNext();

private:
	HANDLE m_hEnum;
	THREADENTRY32 m_ThreadInfo;
	bool m_First;
};

class CHeapList {
public:
	CHeapList(DWORD pid);
	~CHeapList();

	HEAPLIST32* GetNext();

private:
	HEAPLIST32 m_Heap;
	HANDLE m_hEnum;
};
